<template>
    <div class="tab1" v-for="(item, index) of approvalList" :key="index">
        <div class="company" @click="jump({ path: '/ApprovalDetail', query: { auditId: item.auditId } })">
            <div class="box">
                <div class="dv1">
                    <img v-if="item.sex == '女'" class="logo" src="@/assets/images/female.png" alt="">
                    <img v-else class="logo" src="@/assets/images/male.png" alt="">
                </div>
                <div class="dv2">
                    <div class="name1">
                        <span class="sp1">{{item.name}}</span>
                        <span class="sp2">{{item.eduDegree}}</span>
                    </div>
                    <div class="name2" v-if="item.talent_company_info">{{item.talent_company_info.companyName}}</div>
                    <div class="name3">{{item.talentCode}}</div>
                </div>
                <div class="dv3">
                    <div class="name2">{{item.contractStart}}</div>
                    <div class="sh-status ysh" v-if="item.auditStatus == '已审核'">{{item.auditStatus}}</div>
                    <div class="sh-status wsh" v-if="item.auditStatus == '未审核'">{{item.auditStatus}}</div>
                    <div class="sh-status th"  v-if="item.auditStatus == '退回'">{{item.auditStatus}}</div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup>
import { ref, watch, toRefs, onMounted } from 'vue';
import { getTalentList } from '@/api/company.js';
import { useRouter } from 'vue-router';
import { showToast } from 'vant';
const router = new useRouter();

const props = defineProps({
    approvalList: { type: Object, default: () => ({}) }
})




// const approvalList = ref([])
// const getTalent = async () => {
//   const { code, data } = await getTalentList({
//     currentPage: 1,
//     pageSize: 20,
//     companyId: "91321200MACTU4PJ4N",
//   });
//   if (code === 200) {
//     approvalList.value = data.list;
//   }
// }
const jump = (options) => {
  router.push(options);
}
onMounted(() => {
    // getTalent()
})

</script>

<style lang="scss" scoped>
.tab1{
    padding: 1.2rem;
    background: #fff;
    display: flex;
    align-items: flex-start;
    justify-content:flex-start;
    margin: 1.2rem;
}
.company{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}
.box{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.dv1{
    margin-right: 1rem;

    img{
        width: 5.6rem;
    }
}
.dv2{
    .name1{
        font-size: 1.8rem;
        font-weight: 700;
        margin-bottom: 0.9rem;

        .sp1{
            margin-right: 0.7rem;

        }
        .sp2{
            font-size: 1.4rem;
            font-weight: 400;
        }
    }
    .name2{
        font-size: 1.4rem;
        font-weight: 400;
        margin-bottom: 0.6rem;
        color: #666666;
    }
     .name3{
        font-size: 1.4rem;
        font-weight: 400;
        color: #666666;
    }
}
.dv3{
    color: #666666;
    font-size: 1.4rem;
    font-weight: 400;
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    .sh-status{
        width: 5.4rem;
        height: 2.7rem;
        line-height: 2.7rem;
        background: rgba(255, 141, 26, 0.2);
        color: #FF8D1A;
        text-align: center;
        margin-top: 2.5rem;
    }
    .ysh{
        background: rgba(255, 141, 26, 0.2);
        color: #FF8D1A;
    }
    .wsh{
        background: rgba(0, 186, 173, 0.2);;
        color: #00BAAD;
    }
    .th{
        background: rgba(121, 72, 234, 0.2);
        color: #7948EA;
    }
}
</style>